package com.cmbyc.JDBC

import com.cmbyc.JDBC.sink.{Sink1, Sink2, Sink3}
import com.cmbyc.JDBC.source.{Source1, Source2, Source3}
import org.apache.flink.api.scala.createTypeInformation
import org.apache.flink.streaming.api.scala.StreamExecutionEnvironment

/**
 *
 * @program: com.cmbyc.JDBC
 * @author: YCLW058
 * @create: 2021-05-19 14:06
 * @decsription:
 *
 * */

object MySQL_2_MySQL {
  def main(args: Array[String]): Unit = {
    //1 env
    val env = StreamExecutionEnvironment.getExecutionEnvironment
    //2 source
    val ds1 = env.addSource(new Source1).setParallelism(1)
    val ds2 = env.addSource(new Source2).setParallelism(1)
    //val ds3 = env.addSource(new Source3).setParallelism(1)

    //3 transformation
    ds1.join(ds2)

    //4 sink



    //5 execute
    env.execute()

  }

}
